Attribute Grammars and Categorical Semantics
نویسنده
چکیده
We give a new formulation of attribute grammars (AG for short) called monoidal AGs in traced symmetric monoidal categories. Monoidal AGs subsume existing domain-theoretic, graph-theoretic and relational formulations of AGs. Using a 2-categorical aspect of monoidal AGs, we also show that every monoidal AG is equivalent to a synthesised one when the underlying category is closed, and that there is a sound and complete translation from local dependency graphs to relational AGs.
منابع مشابه
Compositional Approach to Structuring andRe nement of Typed Graph Grammars 1
Based on a categorical semantics that has been developed for typed graph grammars we uses colimits (pushouts) to model composition and (reverse) graph grammar morphisms to describe reenements of typed graph grammars. Composition of graph grammars w.r.t. common subgrammars is shown to be compatible with the semantics , i.e. the semantics of the composed grammar is obtained as the composition of ...
متن کاملA New Foundation of Attribute Grammars in Traced Symmetric Monoidal Categories
In this paper we propose a new categorical formulation of attribute grammars in traced symmetric monoidal categories. The new formulation, called monoidal attribute grammars, concisely captures the essence of the classical attribute grammars. We study monoidal attribute grammars in two categories: Rel and ωCPPO. It turns out that in Rel monoidal attribute grammars correspond to the graphtheoret...
متن کاملSem Antics of Gram M Ars and Attributes via Initiality
This paper uses elementary categorical techniques to systematically describe the se mantics of context-free grammars and of attribute evaluation for such grammars. The novelty lies in capturing inherited attributes and their evaluation via exponents and naturality. 1. Intr o d u ctio n Context free grammars form a fundamental topic in computer science, as the basis for compiler construction an...
متن کاملA Categorical Outlook on Cellular Automata
In programming language semantics, it has proved to be fruitful to analyze context-dependent notions of computation, e.g., dataflow computation and attribute grammars, using comonads. We explore the viability and value of similar modeling of cellular automata. We identify local behaviors of cellular automata with coKleisli maps of the exponent comonad on the category of uniform spaces and unifo...
متن کاملJuly 2000 Third Workshop on Attribute Grammars and Their Applications Waga2000 Attribute Grammars as Record Calculus a Structure-oriented Denotational Semantics of Attribute Grammars by Using Cardelli's Record Calculus
In this paper, we present a new denotational semantics of attribute grammars (AGs) by using Cardelli's record calculus. This new denotational semantics is simple, natural and structure-oriented. AGs have been considered useful in describing interactive programming environments as well as in specifying the semantics of programming languages. Using AGs, interactive programming environments are of...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008